package logic

import (
	"context"
	"fmt"

	"mall/service/mqueue/job/internal/svc"

	"github.com/hibiken/asynq"
)

type PublishKbEntryProcessor struct {
	svcCtx *svc.ServiceContext
}

func NewPublishKbEntryProcessor(svcCtx *svc.ServiceContext) *PublishKbEntryProcessor {
	return &PublishKbEntryProcessor{
		svcCtx: svcCtx,
	}
}

// every thirty minute exec : if return err != nil , asynq will retry
func (l *PublishKbEntryProcessor) ProcessTask(ctx context.Context, _ *asynq.Task) error {
	fmt.Printf("shcedule job demo -----> every thirty minute exec PublishKbEntry \n")

	return nil
}
